< previous page page_25 next page >

Page 25
If you are loading an icon resource, the hInstance parameter contains the module handle of the loaded DLL. If the hInstance parameter is NULL, a system icon is loaded. The lpIconName parameter identifies the icon to load and has the following interesting description:
7017a6ead0e3c4111b47a554df321e9f.gif 7017a6ead0e3c4111b47a554df321e9f.gif
Points to a null-terminated string that contains the name of the icon resource to be loaded. Alternatively, this parameter can contain the resource identifier in the low-order word and 0 in the high-order word. Use the MAKEINTRESOURCE macro to create this value.
The MAKEINTRESOURCE function is defined as follows in the winuser.h header file:
#define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
#define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
#ifdef UNICODE
#define MAKEINTRESOURCE MAKEINTRESOURCEW
#else
#define MAKEINTRESOURCE MAKEINTRESOURCEA
#endif // !UNICODE
If the hInstance parameter is NULL, the lpIconName parameter can be one of the following predefined constants:
#ifdef RC_INVOKED
#define IDI_APPLICATION     32512
#define IDI_HAND            32513
#define IDI_OUESTION        32514
#define IDI_EXCLAMATION     32515
#define IDI ASTERISK        32516
#if(WINVER >= 0x0400)
#define IDI_WINLOGO         32517
#endif /* WINVER >= 0x0400 */
#else
#define IDI_APPLICATION     MAKEINTRESOURCE(32512)
#define IDI HAND            MAKEINTRESOURCE(32513)
#define IDI_QUESTION        MAKEINTRESOURCE(32514)
#define IDI EXCLAMATION     MAKEINTRESOURCE(32515)
#define IDI_ASTERISK        MAKEINTRESOURCE(32516)
#if(WINVER >= 0x0400)
#define IDI_WINLOGO         MAKEINTRESOURCE(32517)
#endif /* WINVER >=  x0400 */
#endif /* RC INVOKED */

 
< previous page page_25 next page >